
//--------------------------------------
// TABLE A9: Bill Sponsorship by Issue
//--------------------------------------

* House *

clear
use masterdata_house.dta

gen ln_meansalary = ln(meansalary +1)
gen nolobstaff = numstaff - futurelob
gen femaleratio = numfemale/numstaff

macro define member_char1 "les majority dwnom1 chair subchr seniority maj_leader min_leader power left"
macro define staff_char1 "futurelob cstaff_lob nolobstaff ln_meansalary femaleratio"

forvalues i = 1/20 {
gen lbill`i' = ln(bill`i'+1)
}

* issues from 1 to 5 *
eststo clear
eststo: quietly areg lbill1  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill2  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill3  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill4  $member_char1 $staff_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill5  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(** 0.05 *** 0.01) drop(*committeecode1*) se ar2

* issues from 6 to 10 *
eststo clear
eststo: quietly areg lbill6  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill7  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill8  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill9  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill10 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(** 0.05 *** 0.01) drop(*committeecode1*) se ar2

* issues from 11 to 15 *
eststo clear
eststo: quietly areg lbill11 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill12 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill13 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill14 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill15 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(** 0.05 *** 0.01) drop(*committeecode1*) se ar2

* issues from 16 to 20 *
eststo clear
eststo: quietly areg lbill16 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill17 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill18 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill19 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill20 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(** 0.05 *** 0.01) drop(*committeecode1*) se ar2


* Senate *

clear
use masterdata_senate.dta

gen ln_meansalary = ln(meansalary +1)
gen nolobstaff = numstaff - futurelob
gen femaleratio = numfemale/numstaff

macro define member_char1 "les majority dwnom1 chair subchr seniority maj_leader min_leader power left freshman up_for_reelection"
macro define staff_char1 "futurelob cstaff_lob nolobstaff ln_meansalary femaleratio"

forvalues i = 1/20 {
gen lbill`i' = ln(bill`i'+1)
}

* issues from 1 to 5 *
eststo clear
eststo: quietly areg lbill1  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill2  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill3  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill4  $member_char1 $staff_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill5  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01) drop(*committeecode1*) se ar2

* issues from 6 to 10 *
eststo clear
eststo: quietly areg lbill6  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill7  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill8  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill9  $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill10 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01) drop(*committeecode1*) se ar2

* issues from 11 to 15 *
eststo clear
eststo: quietly areg lbill11 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill12 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill13 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill14 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill15 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01) drop(*committeecode1*) se ar2

* issues from 16 to 20 *
eststo clear
eststo: quietly areg lbill16 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill17 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill18 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill19 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
eststo: quietly areg lbill20 $staff_char1 $member_char1 i.congress i.committeecode1, a(icpsr) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01) drop(*committeecode1*) se ar2



